home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / WindowSystem.h < prev    next >
C/C++ Source or Header  |  1992-08-19  |  2KB  |  89 lines

  1. #ifndef WindowSystem_First
  2. #ifdef __GNUG__
  3. //pragma once
  4. #pragma interface
  5. #endif
  6. #define WindowSystem_First
  7.  
  8. #include "Port.h"
  9. #include "System.h"
  10. #include "Symbol.h"
  11.  
  12. enum WindowType {
  13.     eWinPlain,
  14.     eWinStandard,
  15.     eWinDialog,
  16.     eWinPulldownMenu,
  17.     eWinPopupMenu,
  18.     eWinIcon
  19. };
  20.  
  21. enum WindowFlags {
  22.     eWinDefault     =   0,
  23.     eWinBlock       =   1,
  24.     eWinFixed       =   2,
  25.     eWinCanClose    =   4
  26. };
  27.  
  28. class VObject;
  29. class Window;
  30. class Window;
  31. class WindowPort;
  32. class Data;
  33. class WindowColorMap;
  34.  
  35. //---- WindowSystem ------------------------------------------------------------
  36.  
  37. class WindowSystem : public SysEvtHandler {
  38. public:
  39.     static bool batch;
  40.     static u_long lasttime;
  41.     static bool fullscreen;
  42.     static WindowPort *grabport;
  43.     static Token lastClick;
  44.     static int Clicks;
  45.     static Rectangle screenRect;
  46.     static OrdCollection *allwins;
  47.     static WindowColorMap *wcmap;
  48.     
  49.     static void WSInit();
  50.  
  51. public:
  52.     MetaDef(WindowSystem);
  53.     WindowSystem();
  54.     void InitNew();
  55.  
  56.     virtual ~WindowSystem();
  57.     
  58.     void Update();
  59.  
  60.     virtual void Init();
  61.     virtual WindowPort *MakeWindow(Window *bw, WindowType wt, GrCursor curs);
  62.     virtual void RemoveWindow(WindowPort*);
  63.     void AddWindow(WindowPort*);
  64.     virtual FontManager *MakeFontManager();
  65.     virtual DevBitmap *MakeDevBitmap(Point sz, u_short *data, u_short depth,
  66.                     bool freedata= FALSE, u_short pad= 2);
  67.     virtual void graphicDelay(unsigned int);
  68.     virtual void DevBell(long duration);
  69.     virtual int DevHaveSelection(Data *data);
  70.     virtual void ExtCommand(int from, char *req, char *args, int len,
  71.                             char *&ret, int &retlen);
  72.     virtual VObject *MakeWindowBorder(WindowType wt,
  73.             VObject *in, char *title, bool block, bool fixed);
  74.     void SetWait();
  75.     void ResetWait();
  76.     virtual void DevCheckSelection();
  77. };
  78.  
  79. extern WindowSystem *gWindowSystem;
  80. extern bool         gColor;
  81. extern int          gDepth;
  82. extern int          gMaxDepth;
  83. extern bool         gGreyScale;
  84.  
  85. inline void GraphicDelay(unsigned int duration)
  86.     { gWindowSystem->graphicDelay(duration); }
  87.     
  88. #endif
  89.